{template header}
<style type="text/css">
    .form-horizontal .control-label { width: 100px; float: none; display: inline-block; }
    .form-horizontal .controls {margin-left: 0;}
</style>
<div class="bs-docs-example" style="clear:both;">


    <form class="form-horizontal" method="post">
        
         <div class="dib">
            <label class="control-label" for="inputShortDesc">发送方用户id:</label>
            <div class="controls dib">
                <input name="fromname" type="text" placeholder="发送方用户id" value="{$source_id}" style="width:300px;">    
            </div>
        </div>　　
         <div class="dib">
            <label class="control-label" for="inputShortDesc">接收方用户id:</label>
            <div class="controls dib">
                <input name="toname" type="text" placeholder="接收方用户id" value="{$target_id}" style="width:300px;">    
            </div>
         </div>　　
       
            <div class="controls dib">
                <input type="hidden" value="search" name="search">
                <button type="submit" class="btn">查询</button>
            </div>
      
    </form>

    <table class="table table-striped table-align">
        <thead>
            <tr>
                <th>ID</th>
                <th>类型</th>
                <th>发送方名称(用户ID)</th>
                <th>接收方名称(用户ID)</th>
                <th>消息内容</th>
                
                <th>消息类型(操作OR通知)</th>
                <th>消息状态</th>
                <th>状态时间</th>
                <th>消息时间</th>
            </tr>
        </thead>
        <tbody>
            {loop $data $k $item}
            <tr>
                <td>{$item['id']}</td>
                <td>{$item['conversationType']}</td>

                <td><img width="30" height="30" src="{$item['sourceHeader']}">&nbsp;&nbsp;&nbsp;{$item['sourceName']}({$item['source_id']})</td>
                <td><img width="30" height="30" src="{$item['targetHeader']}">&nbsp;&nbsp;&nbsp;{$item['targetName']}({$item['target_id']})</td>
                <td>{$item['messageContent']}</td>
                <td>{if $item['type'] == 1}操作{else}通知{/if}</td>
                <td>{if $item['status'] == 1}同意{elseif $item['status'] == 2}待验证{else}{if $item['type'] == 1}待操作{else}{/if}{/if}</td>
                <td>{if $item['status_time'] != 0}{eval echo date('Y-m-d H:i:s', $item['status_time'])}{/if}</td>
                <td>{eval echo date('Y-m-d H:i:s', $item['time'])}</td>
            </tr>
            {/loop}
        </tbody>
    </table>
</div>
<div class="pagination">
    <ul>
        {$pageStr}
    </ul>
</div>
{template footer}
